#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<malloc.h>
#include<ctype.h>
#include"vfs_errorcodes.h"
#define SUCCESS 1
#define FAILURE 0
#define KB 1024
#define VFS_MAXIMUM_SIZE (1024*(KB))
#define BLOCKSIZE (KB)*1
#define SMALLSIZE 50
#define SIZE 150
#define LARGESIZE 10000
#define HASHSIZE 95
#define OUTPUTSIZE 100
#define MAXLENGTH 100
#define VERY_LARGE_SIZE 100000
char output_message[SIZE];

typedef struct Header{
	char VFS_Label[SIZE];
	int usedFds;
	int maxFds;
} hd;

int *freelist;

typedef struct FileDescriptor{
	char fileName[SIZE];
	char fullPath[SIZE];
	char fileType[SIZE];
	long int fileSize;
	int blockno;
} fd;

fd *array;

typedef struct directory {
	struct directory *child, *sibling;
	struct FileDescriptor *fd_pointer;
} node;

typedef struct root {
	struct directory *next;
	struct Header *hd_pointer;
} label;


label *l1;
hd *h;
int cnt;

typedef struct hashNode {
 	fd file;			
 	struct hashNode *next;
}h_node;

h_node *hashtable;
char outputStr[OUTPUTSIZE];

typedef struct bstNode {
	fd *fileDesc;
	struct bstNode* left;
	struct bstNode* right;
	struct bstNode* parent;
} b_node;
char outString[MAXLENGTH];
b_node* bstRoot;

#include"function_headers.h"
